package com.ironone.streaming.exception;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.ironone.streaming.R;

public class CrashReportActivity extends Activity {

	TextView error;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		//Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));
		setContentView(R.layout.crashreport_activity);
		error = (TextView) findViewById(R.id.error);
		error.setText(getIntent().getStringExtra("error"));
	}

	public void onClick_report(View v){
		try {
			AlertDialog.Builder alertbox = new AlertDialog.Builder(CrashReportActivity.this);
			alertbox.setTitle(R.string.crash_report);
			alertbox.setMessage(R.string.reported_to_developers_);
			alertbox.setPositiveButton(R.string.ok,
					new DialogInterface.OnClickListener() {
				@SuppressWarnings("deprecation")
				public void onClick(DialogInterface arg0, int arg1) {
					removeDialog(arg1);
					finish();
				}});
			alertbox.show();
		} catch (Exception e) {
		}
	}
}
